package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PersonalIntegralMapper;
import com.ruoyi.system.domain.PersonalIntegral;
import com.ruoyi.system.service.IPersonalIntegralService;

/**
 * 个人积分统计表增删改查Service业务层处理
 * 
 * @author hyb
 * @date 2023-02-18
 */
@Service
public class PersonalIntegralServiceImpl implements IPersonalIntegralService 
{
    @Autowired
    private PersonalIntegralMapper personalIntegralMapper;

    /**
     * 查询个人积分统计表增删改查
     * 
     * @param id 个人积分统计表增删改查主键
     * @return 个人积分统计表增删改查
     */
    @Override
    public PersonalIntegral selectPersonalIntegralById(Long id)
    {
        return personalIntegralMapper.selectPersonalIntegralById(id);
    }

    /**
     * 查询个人积分统计表增删改查列表
     * 
     * @param personalIntegral 个人积分统计表增删改查
     * @return 个人积分统计表增删改查
     */
    @Override
    public List<PersonalIntegral> selectPersonalIntegralList(PersonalIntegral personalIntegral)
    {
        return personalIntegralMapper.selectPersonalIntegralList(personalIntegral);
    }

    /**
     * 新增个人积分统计表增删改查
     * 
     * @param personalIntegral 个人积分统计表增删改查
     * @return 结果
     */
    @Override
    public int insertPersonalIntegral(PersonalIntegral personalIntegral)
    {
        personalIntegral.setCreateTime(DateUtils.getNowDate());
        return personalIntegralMapper.insertPersonalIntegral(personalIntegral);
    }

    /**
     * 修改个人积分统计表增删改查
     * 
     * @param personalIntegral 个人积分统计表增删改查
     * @return 结果
     */
    @Override
    public int updatePersonalIntegral(PersonalIntegral personalIntegral)
    {
        personalIntegral.setUpdateTime(DateUtils.getNowDate());
        return personalIntegralMapper.updatePersonalIntegral(personalIntegral);
    }

    /**
     * 批量删除个人积分统计表增删改查
     * 
     * @param ids 需要删除的个人积分统计表增删改查主键
     * @return 结果
     */
    @Override
    public int deletePersonalIntegralByIds(Long[] ids)
    {
        return personalIntegralMapper.deletePersonalIntegralByIds(ids);
    }

    /**
     * 删除个人积分统计表增删改查信息
     * 
     * @param id 个人积分统计表增删改查主键
     * @return 结果
     */
    @Override
    public int deletePersonalIntegralById(Long id)
    {
        return personalIntegralMapper.deletePersonalIntegralById(id);
    }
}
